from django.db import models


class Questionnaire(models.Model):
    qid = models.CharField(primary_key=True, max_length=20, unique=True, verbose_name="问题ID")
    title = models.CharField(max_length=100, verbose_name="标题")
    describe = models.CharField(max_length=200, verbose_name="描述")
    cover_img = models.URLField(verbose_name="封面图片")
    to_url = models.URLField(verbose_name="访问的URL")
    expire_date = models.DateTimeField(verbose_name="截止日期")
    value = models.PositiveSmallIntegerField(verbose_name="价值")
    duration = models.PositiveSmallIntegerField(verbose_name="时长")

    class Meta:
        verbose_name_plural = verbose_name = "问卷信息表"
